<?php
    $servername = "localhost";
    $username = "root";
    $password = "root";
    $dbname = "exp1";
    $conn= new mysqli($servername, $username, $password, $dbname);
    // 检测连接
    if ($conn->connect_error) {
        die("Connection failed: " . mysqli_connect_error());
    }
?>